const book = {
    name: "JavaScript 入门指南",
    page: 123, 
    size: "A5",
}

const person = {
    name: "Bob",
    age: 32,
    hello() {
        console.log(this)
        console.log(`你好，我叫 ${this.name}`)
    },
    honor: [
        { title: "Emloyee of the Month", year: 2024},
        { title: "Best seller", year: 2020},
    ],
    sayHonor(){
        this.honor.forEach(h =>{
            console.log(h.title, h.year)
        })
    }
}

person.sayHonor()

// console.log(person.name) //Bob
//console.log(person.hello()) //你好，我叫 Bob

// person.name = "Tom"
// console.log(person.hello()) 

// console.log(this)
// console.log(person.age)
// person["eyes"] = "hazel"
// console.log(person.eyes)